<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
    <head>
            <meta charset="utf-8">
            <title>提现</title>
            <meta http-equiv="Content-type" content="text/html; charset=utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta http-equiv="Cache-Control" content="no-transform" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
            <meta name="apple-mobile-web-app-status-bar-style" content="black">
            <meta name="renderer" content="webkit">
            <!--uc浏览器判断到页面上文字居多时，会自动放大字体优化移动用户体验。添加以下头部可以禁用掉该优化-->
            <meta name="wap-font-scale" content="no">
            <meta content="telephone=no" name="format-detection"/>
            <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
            <link rel="stylesheet" type="text/css" href="/majiang/Public/home/css/mian.css"/>
            <script src="/majiang/Public/home/js/jquery-1.10.2.min.js" type="text/javascript" charset="utf-8"></script>
            <script src="/majiang/Public/home/js/html5.js" type="text/javascript" charset="utf-8"></script>
            <script>
            	 (function (doc, win) {
					var docEl = doc.documentElement,
					resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',         
					recalc = function () {
					  var clientWidth = docEl.clientWidth;
					  <!--
					  /*自加*/
					  clientWidth = document.documentElement ? document.documentElement.clientWidth : document.body.clientWidth;
					  if (clientWidth > 720) clientWidth = 720;
					  /*自加*/
					  -->
					  if (!clientWidth) return;
					  docEl.style.fontSize = 20 * (clientWidth / 720) + 'px';
					};
					  if (!doc.addEventListener) return;
					  win.addEventListener(resizeEvt, recalc, false);
					  doc.addEventListener('DOMContentLoaded', recalc, false);
				})(document, window);
            </script>
    </head>
    
    <body>
    	<div class="box">
            <header class="head">
            	<a href="<?php echo U('index/index');?>"></a>
                <h4>提现</h4>
            </header>
            <div class="li_content pd_t100">
            	<div class="li_tixian">
                  <form name="form1" method="post" action="<?php echo U('index/tixian');?>" onsubmit="return check()">
                  		<div class="ktxye">
                        	<h4>当前可提现余额</h4>
                            <p><?php echo $yue?><em>元</em></p>
                        </div>
                        <div class="input_box">
                            <span>真实姓名:</span>
                            <input type="text" name="info[pop_bankperson]" id="pop_bankperson"  maxlength="10">
                        </div>
                        <div class="input_box">
                            <span>银行名称:</span>
                            <input type="text" name="info[pop_bank]" id="pop_bank" 
							maxlength="20">
                        </div>
                        <div class="input_box">
                            <span>银行卡号:</span>
                            <input type="text" name="info[pop_bankcode]" id="pop_bankcode"   maxlength="30">
                        </div>
                        <div class="input_box" style="margin-top:2.5rem;">
                            <span>提现金额:</span>
                            <input type="text" name="info[pop_money]" id="pop_money"   errormsg="提现金额不能为空且只能为数字！" maxlength="10">
                        </div>
                        <a href="<?php echo U('index/tixianlist');?>">提现记录</a>
                        <div class="button_box">
                       	  <input type="submit" name="button" id="button" value="提交">
                      	</div>
                  </form>
                </div>
            </div>
        </div>
    </body>
	<script>	
		function check(){
			var maxamount=<?php echo $yue; ?>;
			
			if($("#pop_bankperson").val()==""){
				alert("真实姓名不能为空！");
				$("#pop_bankperson").focus();
				return false;	
			}
			var regex1 =  /^[\u4e00-\u9fa5]{0,}$/;
            var pop_bankperson = document.getElementById("pop_bankperson");
			if(!regex1.test(pop_bankperson.value)){
			  alert("真实姓名只能输入汉字！");
			  $("#pop_bankperson").focus();
				return false;	
            }
			if($("#pop_bank").val()==""){
				alert("银行名称不能为空！");
				$("#pop_bank").focus();
				return false;	
			}
			var regex =  /^[\u4e00-\u9fa5]{0,}$/;
            var pop_bank = document.getElementById("pop_bank");
			if(!regex.test(pop_bank.value)){
			  alert("银行名称只能输入汉字！");
			  $("#pop_bank").focus();
				return false;	
            }
			var res=/^(\d{16}|\d{19})$/;
			if($("#pop_bankcode").val()=="" || !res.test($("#pop_bankcode").val())){
				alert("银行卡号不能为空或者输入不正确！");
				$("#pop_bankcode").focus();
				return false;	
			}
			if($("#pop_money").val()==""){
				alert("提现金额不能为空！");
				$("#pop_money").focus();
				return false;	
			}
			if($("#pop_money").val()<10){
				alert("提现金额少于最低限额10元，不能提现！");
				return false;
			}
			if($("#pop_money").val()>maxamount){
				alert("提现金额不能大于可提现金额，不能提现！");
				return false;
			}
		document.form1.Submit.disabled=true;
		}
	//判断数字	
	function clearNoNum(obj){
		obj.value = obj.value.replace(/[^\d.]/g,"");  //清除“数字”和“.”以外的字符
		obj.value = obj.value.replace(/^\./g,"");  //验证第一个字符是数字而不是.
		obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个. 清除多余的.
		obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
	}
	</script>
</html>